﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Configuration;

namespace SMTP
{
    
    class Config
    {
        public static string IP {get; set;}
        public static int ConnectionQueue { get; set; }
        public static int ReceiveTimeout { get; set; }
        public static int SendTimeout { get; set; }
        public static int AllowedConnectionCount { get; set; }
        public static string WelcomeMessage = string.Empty;
        

        public static void Load() {
            Config.IP = ConfigurationManager.AppSettings["IP"];
            Config.ConnectionQueue = int.Parse(ConfigurationManager.AppSettings["ConnectionQueue"]);
            Config.ReceiveTimeout = int.Parse(ConfigurationManager.AppSettings["ReceiveTimeout"]);
            Config.SendTimeout = int.Parse(ConfigurationManager.AppSettings["SendTimeout"]);
            Config.AllowedConnectionCount = int.Parse(ConfigurationManager.AppSettings["AllowedConnectionCount"]);
            Config.WelcomeMessage = ConfigurationManager.AppSettings["WelcomeMessage"];
            
        }
    }
}
